import request from '@/utils/request'

// 创建联系人
export function createContactApi(data){
	return request({
		url: '/crm/contact/create',
		method: 'POST',
		data: data
	})
}
// 获取联系人列表
export function getContactListApi(data){
	return request({
		url: '/crm/contact/page',
		method: 'GET',
		params: data
	})
}
// 获取联系人详情
export function getContactDetailApi(id){
	return request({
		url: `/crm/contact/get?id=${id}`,
		method: 'GET'
	})
}
// 更新联系人
export function updateContactApi(data){
	return request({
		url: '/crm/contact/update',
		method: 'PUT',
		data: data
	})
}
// 删除联系人
export function deleteContactApi(id){
	return request({
		url: `/crm/contact/delete?id=${id}`,
		method: 'DELETE'
	})
}